// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .CS}

//-------------MAIN---------------
thread 'FUL' 
if 
8AAB:   not file_exists "MODELS\TXD\SPEED.TXD" 
jf @CAR_COLORS_2447A 
0ACD: show_text_highpriority "~R~~H~ERROR FILE ~W~~H~[ MODELS\TXD\SPEED.TXD ] ~R~~H~NOT FOUND" time 5000 
end_thread 

:CAR_COLORS_2447A
0adf: "speeg" "~1~ km/h"
0390: load_txd_dictionary "SPEED" 
0AF1: write_int 0 to_ini_file "CLEO\POZIT.INI" section "SPED" key "KEY0" 
038F: load_texture "CIF" as 7 // Load dictionary with 0390 first 
038F: load_texture "CIFN" as 8 // Load dictionary with 0390 first 
038F: load_texture "STRELK" as 9 // Load dictionary with 0390 first 
0209: 10@ = random_int_in_ranges 1 255 
0209: 11@ = random_int_in_ranges 1 255 
0209: 12@ = random_int_in_ranges 1 255 
0209: 13@ = random_int_in_ranges 1 255 
0209: 14@ = random_int_in_ranges 1 255 
0209: 15@ = random_int_in_ranges 1 255 
0209: 16@ = random_int_in_ranges 7 9 
if 
  16@ == 9 
jf @FUL_414 
16@ = 7 

:FUL_414
wait 5 
if 
   Player.Defined($PLAYER_CHAR)
jf @FUL_414 
if and
   Actor.Driving($PLAYER_ACTOR)
84C8:   not actor $PLAYER_ACTOR driving_flying_vehicle 
84A7:   not actor $PLAYER_ACTOR driving_boat 
jf @FUL_5E6 
0811: 1@ = actor $PLAYER_ACTOR used_car 
02E3: 2@ = car 1@ speed 
2@ *= 3.0 
if 
   not 2@ > 253.0 
jf @FUL_4C9 
//03F0: enable_text_draw 0 
03E3: set_texture_to_be_drawn_antialiased 1 
038D: draw_texture 16@ position 550.0 360.0 size 100.25 100.25 RGBA 255 255 255 255 
03E3: set_texture_to_be_drawn_antialiased 1 
074B: draw_texture 9 position 550.0 360.0 scale 100.25 100.25 2@ color_RGBA 10@ 11@ 12@ 255 

:FUL_4C9
if 
  2@ > 253.0 
jf @FUL_538 
//03F0: enable_text_draw 0 
03E3: set_texture_to_be_drawn_antialiased 1 
038D: draw_texture 16@ position 550.0 360.0 size 100.25 100.25 RGBA 255 255 255 255 
03E3: set_texture_to_be_drawn_antialiased 1 
074B: draw_texture 9 position 550.0 360.0 scale 100.25 100.25 253.0 color_RGBA 10@ 11@ 12@ 255 

:FUL_538
02E3: 18@ = car 1@ speed 
0092: 17@ = float 18@ to_integer 
17@ *= 2.0 
03F0: enable_text_draw 0
0349: set_text_draw_font 3 
0340: set_text_draw_RGBA 13@ 14@ 15@ 255 
033F: set_text_draw_letter_size 0.3 0.8 
060D: draw_text_shadow 1 rgba 50 50 255 255 
0AB8: get_vehicle 1@ current_gear_to 3@ 
045A: draw_text_1number 530.0 377.0 GXT 'SPEEG' number 17@ 
0349: set_text_draw_font 3 
0340: set_text_draw_RGBA 13@ 14@ 15@ 255 
033F: set_text_draw_letter_size 0.3 0.8 
060D: draw_text_shadow 1 rgba 50 50 255 255 
045A: draw_text_1number 530.0 369.0 GXT 'NUMBER' number 3@  // ~1~

:FUL_5E6
0AF0: 0@ = get_int_from_ini_file "CLEO\POZIT.INI" section "SPED" key "KEY0" 
if 
  0@ == 1 
jf @FUL_61F 
03F0: enable_text_draw 0 
end_thread 

:FUL_61F
if 
   not Actor.Driving($PLAYER_ACTOR)
jf @FUL_633 
03F0: enable_text_draw 0 

:FUL_633
jf @FUL_414 
jump @FUL_414 
end_thread 
